package web.blogsphere.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import web.blogsphere.model.UserInfo;

/**
 * @ClassName UserInfoMapper
 * @Description TODO
 * @Author ZJX
 * @Date 2024/9/3 20:49
 * @Version 1.0
 */
@Mapper
public interface UserInfoMapper {

//    根据用户名 查询用户信息
    @Select("select * from user_info where delete_flag = 0 and user_name = #{userName}")
    UserInfo selectByName(String userName);

//    根据用户Id, 查询用户信息
    @Select("select * from user_info where delete_flag = 0 and id = #{id}")
    UserInfo selectById(Integer id);

}
